package com.lagou.gateway.standard.formatter.minimize;

import com.lagou.gateway.BaseResponseBodyEntity;
import com.lagou.gateway.ResponseCodeEnum;

public class MinimizeResponseBodyEntity extends BaseResponseBodyEntity {
    private Object data;


    /**
     * 成功才会返回data
     * @param code
     * @param message
     * @param data
     */
    public MinimizeResponseBodyEntity(Integer code,String message,Object data) {
        super(code, message);
        if (code == ResponseCodeEnum.SUCCESS) {
            this.data = data;
        }
    }

    public MinimizeResponseBodyEntity(Integer code,String message){
        super(code, message);
    }

    public Object getData() {
        return data;
    }
}
